import os
dir = os.getcwd()
print(dir)
nameList = os.listdir(dir)
print(nameList)
'''
for i in range(len(nameList)):
    if '.sql' in nameList[i]:
        if '(1)' in nameList[i]:
            text = '输入、输出、条件、循环'
        elif '(2)' in nameList[i]:
            text = '程序题目练习'
        elif '(3)' in nameList[i]:
            text = '游标、动态sql'
        elif '(4)' in nameList[i]:
            text = '1104练习题练习讲解'
        elif '(5)' in nameList[i]:
            text = '自定义函数'
        elif '(6)' in nameList[i]:
            text = '入参的类型、异常'
        elif '(7)' in nameList[i]:
            text = '包、登录系统练习'
        elif '(8)' in nameList[i]:
            text = '函数、存储过程练习题讲解'
        elif '(9)' in nameList[i]:
            text = '表空间、序列'
        elif '(10)' in nameList[i]:
            text = '索引、表分区'
        os.rename(nameList[i]
, nameList[i][6:14]+' '+text+'.sql')
'''
for i in range(len(nameList)):
    if '.sql' in nameList[i]:
        os.rename(nameList[i], nameList[i].replace('-', ' - '))